
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpGtTree.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpGtTreeForm"
 */
public class CcpGtTreeForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cgtGuid = null;
   private java.lang.String _cgtName = null;
   private java.lang.String _cgtCode = null;
   private java.lang.String _style = null;
   private java.lang.String _explain = null;
   private java.lang.String _entityName = null;
   private java.lang.String _addbtnName = null;
   private java.lang.String _editbtnName = null;
   private java.lang.String _delbtnName = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpGtTreeForm() {
   }

   /**
    * Returns the cgtGuid
    *
    * @return the cgtGuid
    */
   public java.lang.String getCgtGuid() {
      return _cgtGuid;
   }

   /**
    * Sets the cgtGuid
    *
    * @param cgtGuid the new cgtGuid value
    */
   public void setCgtGuid(java.lang.String cgtGuid) {
      _cgtGuid = cgtGuid;
   }
   /**
    * Returns the cgtName
    *
    * @return the cgtName
    */
   public java.lang.String getCgtName() {
      return _cgtName;
   }

   /**
    * Sets the cgtName
    *
    * @param cgtName the new cgtName value
    */
   public void setCgtName(java.lang.String cgtName) {
      _cgtName = cgtName;
   }
   /**
    * Returns the cgtCode
    *
    * @return the cgtCode
    */
   public java.lang.String getCgtCode() {
      return _cgtCode;
   }

   /**
    * Sets the cgtCode
    *
    * @param cgtCode the new cgtCode value
    */
   public void setCgtCode(java.lang.String cgtCode) {
      _cgtCode = cgtCode;
   }
   /**
    * Returns the style
    *
    * @return the style
    */
   public java.lang.String getStyle() {
      return _style;
   }

   /**
    * Sets the style
    *
    * @param style the new style value
    */
   public void setStyle(java.lang.String style) {
      _style = style;
   }
   /**
    * Returns the explain
    *
    * @return the explain
    */
   public java.lang.String getExplain() {
      return _explain;
   }

   /**
    * Sets the explain
    *
    * @param explain the new explain value
    */
   public void setExplain(java.lang.String explain) {
      _explain = explain;
   }
   /**
    * Returns the entityName
    *
    * @return the entityName
    */
   public java.lang.String getEntityName() {
      return _entityName;
   }

   /**
    * Sets the entityName
    *
    * @param entityName the new entityName value
    */
   public void setEntityName(java.lang.String entityName) {
      _entityName = entityName;
   }
   /**
    * Returns the addbtnName
    *
    * @return the addbtnName
    */
   public java.lang.String getAddbtnName() {
      return _addbtnName;
   }

   /**
    * Sets the addbtnName
    *
    * @param addbtnName the new addbtnName value
    */
   public void setAddbtnName(java.lang.String addbtnName) {
      _addbtnName = addbtnName;
   }
   /**
    * Returns the editbtnName
    *
    * @return the editbtnName
    */
   public java.lang.String getEditbtnName() {
      return _editbtnName;
   }

   /**
    * Sets the editbtnName
    *
    * @param editbtnName the new editbtnName value
    */
   public void setEditbtnName(java.lang.String editbtnName) {
      _editbtnName = editbtnName;
   }
   /**
    * Returns the delbtnName
    *
    * @return the delbtnName
    */
   public java.lang.String getDelbtnName() {
      return _delbtnName;
   }

   /**
    * Sets the delbtnName
    *
    * @param delbtnName the new delbtnName value
    */
   public void setDelbtnName(java.lang.String delbtnName) {
      _delbtnName = delbtnName;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCgtGuid() == null) {
         errors.add("cgtGuid", new ActionError("error.cgtGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
